package com.x86.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.x86.domain.FeedbackVO2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.x86.mapper.FeedbackMapper;
import com.x86.domain.Feedback;
import com.x86.service.FeedbackService;

/**
 * @author 风亦未止
 * @date 2022/4/10 19:27
 */
@Service
public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {
    @Autowired
    public FeedbackMapper feedbackMapper;

    @Override
    public PageInfo<FeedbackVO2> getMyFeedback(Integer userid,int pageSize,int pageNum) {
        return PageHelper.startPage(pageNum,pageSize).doSelectPageInfo(()->{
            feedbackMapper.getMyFeedback(userid);
        });
    }

    @Override
    public PageInfo<FeedbackVO2> getFeedbackList(int pageSize,int pageNum) {
        return PageHelper.startPage(pageNum,pageSize).doSelectPageInfo(()->{
            feedbackMapper.getFeedbackList();
        });
    }
}

